package com.amkai.aes.webservice.binary.objecthandler.calendar;

import java.io.Serializable;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.amkai.aes.aescommon.service.calendar.CalendarJob;
import com.amkai.aes.aescommon.service.calendar.CalendarResult;
import com.amkai.aes.aescommon.service.ddm.DDMJob;
import com.amkai.aes.aescommon.service.ddm.DDMResult;
import com.amkai.aes.server.calendar.CalendarProvider;
import com.amkai.aes.server.ddm.DDMProvider;
import com.amkai.aes.webservice.binary.JobObjectHandler;

public class CalendarHandler implements JobObjectHandler<CalendarJob, Serializable, CalendarResult> {
	private static final Log logger = LogFactory.getLog(CalendarHandler.class);
	
	public CalendarResult process(CalendarJob job, Serializable object) throws Exception {
		CalendarProvider cp = new CalendarProvider();
		try {
			return cp.processJob(job, object);
		} catch (Throwable e) {
			logger.error("Calendar: ", e);
			throw new Exception(e);
		}
	}

}
